package com.fenghongzhang.day002arouter;

import android.content.Context;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Interceptor;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.template.IInterceptor;

//@Interceptor( priority = 3,name = "test")
public class MyIntercurpt implements IInterceptor {
    @Override
    public void process(Postcard postcard, InterceptorCallback callback) {
//        String path = postcard.getPath();
//        callback.onContinue(postcard);
        callback.onInterrupt(new RuntimeException("拦截了"));
    }

    @Override
    public void init(Context context) {

    }
}
